<!DOCTYPE html>
<html>
  <head>
    <title>Icon Symbolizer</title>
    <style>
      #map {
        position: relative;
      }
    </style>
  </head>
  <body>
    <audio id="audio" autoplay>
      <source type="audio/mp3" src="text2audio.mp3">
      <source type="audio/mp3" src="text2audio2.mp3">
    </audio>
  </body>
    <script type="text/javascript">
      // audio = new Audio("text2audio.mp3");
      var audio = document.getElementById("audio");
      console.log(audio);
      audio.addEventListener('ended',function(){
            audio.src = "text2audio2.mp3";
            audio.pause();
            audio.load();
            audio.play();
        });
    </script>
</html>